local FlowText = class("FlowText")
local GameUtils = require("utils.GameUtils")

local FLY_TIME = 1
local SPEED = 200

function FlowText:ctor()
    self._flyDt = 0
end

function FlowText:awake()
end

function FlowText:setTip(text)
    self._textTip.text = text
end

function FlowText:start()
    GameUtils.destroy(self.gameObject, FLY_TIME)
end

function FlowText:update()
    local position = self.transform.localPosition
    position.y = position.y + SPEED * G_Time.deltaTime
    self.transform.localPosition = position
end

return FlowText
